<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    

<script>
    // 编写一个方法 去掉一个数组的重复元素
    function remove(arr){
        var tem = [];
        for(var i=0;i<arr.length;i++){
            if(tem.indexOf(arr[i])==-1){
                tem.push(arr[i]);
            }
        }
        return tem;
    }
    var arr = [1,5,2,2,6,3,3,2,5,5,8,8,6,6,1,3,2,3];
    console.log(remove(arr));
</script>
</body>
</html>